<%@ page import="com.conversationboard.model.*" %>
<%@ page import="com.conversationboard.view.*" %>
<%@ page import="com.conversationboard.config.*" %>
<%@ page import="com.conversationboard.controller.confirm.Confirm" %>
<%@ page import="java.security.*" %>

<%@ page pageEncoding="UTF-8"%>
<%@ page contentType="text/html;charset=UTF-8"%>

<%
	User user = User.getAnonymousUser();
	Principal principal = request.getUserPrincipal();
	user = User.get(principal.getName());
%>

<html>

	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
		<title>Create a new Board Admin</title>
		<link rel="stylesheet" type="text/css" href="<%=Configuration.getInstance().getRoot()%>/Stylesheets/<%=StyleSheets.getStyleSheetFileName(request.getCookies())%>"/>
	</head>

	<body>

		<%= MainMenu.display(request.getUserPrincipal()) %>
	
		<div class="headingblock">
			<h1>Ban Pattern</h1>
		</div>
		
		<div class="mainblock">

			<form class="formsection" action="<%=Configuration.getInstance().getRoot()%>/Admin/AdminBanRangeControllerServlet" method="post">
			 	
				<p>This is a <strong>sophisticated banning mechanism</strong>. Please be aware of what you
				   are doing with it, as it gives you the ability to ban a range of users.</p>
				   
				<p>The banning mechanism takes a regular expression and compares it against users' login IDs, i.e. their
				   email address, and also their IP address. If you don't know how to use regular expressions (Java regular
				   expressions, which differ from Perl 5), then turn back now! You could wind up banning a country!</p>
				
				<p>The patterns will be matched against the login id (email) and the IP address.</p>

			 	<%= Confirm.getKey(request.getUserPrincipal().getName()) %>
			 	
			 	<label for="pattern">Enter Regular Expression:</label>
			 	<input name="pattern" class="smalltextbox" type="text" size="100" /><br /><br />
			 	
			 	From Board: <%= BoardDisplay.displayDropDown(user) %>
			 	
			 	<br /><br />
			 	<p><input type="submit" value="Apply Permanent Ban" /></p>
			 	
			</form>
		</div>
	
		<!--<script src="http://www.google-analytics.com/urchin.js" type="text/javascript"></script>-->
		<!--<script type="text/javascript">_uacct = "UA-1148679-1";urchinTracker();</script>--> 
		
	</body>
	
</html>
